// import { useEditorStore } from '@/store/editor';

/**
 * 面板动作列表
 */
export const panelActionList = [
  {
    label: '设置显隐',
    value: 'setVisible',
    execute: (id: string, visible: boolean) => {
      // const editorStore = useEditorStore();
    },
  },
  {
    label: '打开链接',
    value: 'openWindow',
    execute: (id: string, url: string) => {
      // window.open(url, '_self');
      window.open(url, '_blank');
    },
  },
];

/**
 * 面板动作字典
 */
export const panelActionMap = panelActionList.reduce((prev, current) => {
  prev[current.value] = current.execute;
  return prev;
}, {} as Record<string, any>);
